#ifndef SERVICE_STUDENT_H
#define SERVICE_STUDENT_H

#include "student_interface.h"

/**
 * Structure to hold the context for student services.
 */
typedef struct {
        student_interface_t *student_interface; /** Pointer to the interface */
} service_student_context_t;

/**
 * Initialize the student service context.
 */
status_t service_init_student(service_student_context_t *context,
                              student_interface_t       *interface);

/**
 * Add a student and.
 */
status_t service_add_student(service_student_context_t *context,
                             const student_info_t      *info);

/**
 * Delete a student by id.
 */
status_t service_delete_student_id(service_student_context_t *context,
                                   const char                *id,
                                   student_info_t            *info);
/**
 * Delete a student by name.
 */
status_t service_delete_student_name(service_student_context_t *context,
                                     const char                *name,
                                     student_info_t            *info);
/**
 * Update student information.
 */
status_t service_update_student(service_student_context_t *context,
                                const student_info_t      *info);

/**
 * Query a student by id.
 */
status_t service_query_student_id(service_student_context_t *context,
                                  const char                *id,
                                  student_info_t            *info);
/**
 * Query a student by name.
 */
status_t service_query_student_name(service_student_context_t *context,
                                    const char                *name,
                                    student_info_t            *info);

/**
 * Retrieve all student information from the data layer.
 */
status_t service_get_all_student(service_student_context_t *context,
                                      student_info_t           **students,
                                      size_t                    *count);

#endif /* STUDENT_SERVICE_H */
